import {login} from '@/axios/request';
export default {
  data () {
    return {
    };
  },
  methods: {
    login (username, password, label) {
      window.sessionStorage.setItem('duan', label); // 设置当前段
      login({username, password}).then(res => {
        if (res.code === 0) {
          res.data.user.roleId = res.data.roleId;
        }
      }).catch(err => {
        console.log(err);
      });
    }
  }
};
